package ${basepackage}.mapper.op;

import java.util.List;

import ${basepackage}.model.criteria.op.AuthorityCriteria;

import ${basepackage}.model.po.op.Authority;
import ${basepackage}.model.po.op.RoleAuthority;

import org.apache.ibatis.annotations.Param;

import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;

/**
 * @author "Jiance Qin"
 * 
 * @date 2014年2月24日
 * 
 * @time 下午12:07:33
 * 
 */
public interface AuthorityMapper {

	public Authority get(Long id);

	public List<Authority> getAll();

	public void remove(Long id);

	public Long insert(Authority authority);

	public Integer update(Authority authority);

	public PageList<Authority> getList(@Param("criteria") AuthorityCriteria criteria, PageBounds pageBounds);

	public Integer getCount(@Param("criteria") AuthorityCriteria criteria);
	
	public Authority getByName(String name);

	public List<Authority> getByRoleId(Long roleId);

	public Integer saveRoleAuthority(RoleAuthority roleAuthority);

	public Integer deleteRoleAuthority(RoleAuthority roleAuthority);

	public Integer deleteRoleAuthorityByRoleId(Long roleId);
}
